<%@ page language="java" contentType="text/html; charset=UTF-8"
	pageEncoding="UTF-8"%>
<%@taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<link rel='stylesheet' type='text/css'
	href="/${initParam.context_root}/css/dtree.css" />
<script type='text/javascript'
	src="/${initParam.context_root}/js/dtree.js"></script>
<script src="http://code.jquery.com/jquery-latest.js"></script>
<body>
<div class="dtree" id="dtree">
	<p>
		<a href="javascript: d.openAll()"> <font
			style="cursor: pointer; color: red;" size="2"><b>모두 보기</b></font></a> | <a
			href="javascript: d.closeAll();"> <font
			style="cursor: pointer; color: red;" size="2"><b>모두 닫기</b></font></a>
	</p>
	<script type="text/javascript">
		var d = new dTree('d');
	</script>
	<c:forEach items="${requestScope.selectDeptList}" var="dept" varStatus="i">
	<script type="text/javascript">
			d.add('${dept.firstType }', '${dept.secondType }', '${dept.deptName }');			
	</script>
	</c:forEach>
	<script type="text/javascript">			
		document.write(d);
	</script>
	
		<table>
		<tr bgcolor = "lightgray">
			<th>first</th>
			<th>second</th>
			<th>부서명</th>
		</tr>
		<c:forEach items="${requestScope.selectDeptList}" var="dept" varStatus="i">
			<tr>
				<td><c:out value="${dept.firstType }"/>&nbsp;</td>
				<td><c:out value="${dept.secondType }"/>&nbsp;</td>
				<td><c:out value="${dept.deptName }"/>&nbsp;</td>				
			</tr>		
		</c:forEach>
	</table>
</div>
</body>
</head>
</html>